package fightplan.core;

import java.io.File;
import java.io.IOException;

public class TournamentMemento {

	private File beforeFile;
	// private File afterFile;
	private String undoText;
	private String redoText;
	private TournamentMemento prev;
	private TournamentMemento next;

	public TournamentMemento(TournamentMemento prev, String undoText) {
		this.prev = prev;
		if (prev != null) {
			prev.next = this;
		}

		this.undoText = undoText;

		try {
			beforeFile = File.createTempFile("TournamentMemento", ".trn");
			// afterFile = File.createTempFile("TournamentMemento", ".trn");
		} catch (IOException iox) {
			iox.printStackTrace();
		}
	}

	public File getBeforeFile() {
		return beforeFile;
	}

	// public File getAfterFile() {
	// return afterFile;
	// }

	public TournamentMemento getNext() {
		return next;
	}

	public TournamentMemento getPrev() {
		return prev;
	}

	public void setRedoText(String redoText) {
		this.redoText = redoText;
	}

	public String getRedoText() {
		return redoText;
	}

	public String getUndoText() {
		return undoText;
	}

}